import '../models/base_model.dart';
import '../utils/http_util.dart';

// 用户相关接口
class UserApi {

  // 用户登录
  static Future<void> login(
    {required String username, required String password}) async {
    Map<String, dynamic> loginMap = <String, dynamic>{};
    loginMap["username"] = username;
    loginMap["password"] = password;

    var response = await HttpUtil.post('/user/login', data: loginMap);
    BaseModel.fromJson(response.data);
    return;
  }

}